<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 1/5/2020
  Time: 下午1:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>验证码</title>
  <style type= "text/css">
    .code_a{
      color: blue; //设置字体颜色为蓝色
    font-size: 12px; //设置字体大小
    text-decoration: underline blue;    //在文字下面加上蓝色下划线
    cursor: pointer;   //设置鼠标样式
    }
    #imgCode {
      cursor:pointer;    //设置鼠标放在验证码图片上时的样式
    }
  </style>
  <script type="text/javascript">
    function changeCode() {
      var imgCode = document.getElementById("imgCode");
      imgCode.src = "<%=request.getContextPath()%>/servlet/NewCode?d="+Math.random();//在servlet尾部生成随机数字，却保每次刷新得到的网页是全新的网页
    }
  </script>


</head>
<body>
<form action="<%=request.getContextPath()%>/LandR/imageAuthCode/ImageCode" method = "post">
  <label>验证码：</label>
  <input type="text" id = "inCode" name="inCode"/>
  <img src = "<%=request.getContextPath()%>/LandR/imageAuthCode/NewCode" align="center" id="imgCode" onclick="changeCode()"/>
  <a class="code_a " onclick="changeCode()">换一张</a><br/>
  <input type = "submit" value = "登录"/>
</form>
<div style="color:red">${err}</div>
</body>
</html>
